#include <iostream>
#include <iomanip>
using namespace std;
int kai[5050][5050];
int main ()
{
	int n;
	cin>>n;
	kai[1][1]=1;
	for (int i=2;i<=n;i++)
		for (int j=1;j<=i;j++)
			kai[i][j]=kai[i-1][j-1]+kai[i-1][j];
	for (int i=1;i<=n;i++)
	{
		for (int j=1;j<=i;j++)
			cout<<setw (3)<<kai[i][j];
		cout<<endl;
	}
	return 0;
}
